package com.lbd.gulimall.search.vo;

import lombok.Data;

import java.util.List;

/**
 * @Author: linbd
 * @Description: keyword=小米&sort=saleCount_desc/asc&hasStock=0/1&skuPrice=400_1900&brandId=1&catalog3Id=1
 *                  &attrs=1_3G:4G:5G&attrs=2_骁龙845&attrs=4_高清屏
 * @Date: 2023/2/25 21:10
 */
@Data
public class SearchParam {

    /**
     * 排序条件
     **/
    //排序参数自定义字符串拼接封装，前端统一传sort为key，值：排序字段名_desc/asc  =>  sort=saleCount_desc 倒序排销量
    private String sort;

    /**
     * 分页参数
     **/
    private Integer pageNum = 1;

    /**
     * 筛选条件
     **/
    //全文检索关键字
    private String keyword;
    //精确匹配
    private Long catalog3Id;
    //多选。brandId=1&brandId=2   =>  [1,2]
    private List<Long> brandId;
    //价格区间：字符串拼接：1_500，_500，500_
    private String skuPriceRange;
    private Integer hasStock;
    //多选。属性规定：(attrs=1_微软:其他)&(attrs=5英寸:6英寸)   （attrs = 属性id_多选条件1:多选条件2）
    private List<String> attrs;
    //前端原始请求参数串
    private String _qStr;

}
